﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Abp.Domain.Repositories;
using Permissions.Models;
using Permissions.Role_PermissionsApp.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Permissions.Role_PermissionsApp
{
    public class Role_PermissionsAppService: IRole_PermissionsAppService
    {
        private readonly IRepository<Role_Permissions> _rolePermissionsRepository;

        public Role_PermissionsAppService(IRepository<Role_Permissions> rolePermissionsRepository)
        {
            _rolePermissionsRepository = rolePermissionsRepository;
        }

        public void CreateRole_Permissions(CreateRole_PermissionsInput input)
        {
            throw new NotImplementedException();
        }

        public ListResultDto<Role_PermissionsDto> GetRole_Permissionss()
        {
            var role_Permissionss = _rolePermissionsRepository.GetAll();

            return new ListResultDto<Role_PermissionsDto>(role_Permissionss.MapTo<List<Role_PermissionsDto>>());
        }

        public void UpdateRole_Permissions(UpdateRole_PermissionsInput input)
        {
            throw new NotImplementedException();
        }
    }
}
